<#if parentId?has_content>
<ul>
    <@_categoryList advanced=true parentId=parentId pageSize=500>
        <#list page.list as a>
            <li<#if a.childIds?has_content> _src="cmsCategory/lookup.html?currentCategoryId=${currentCategoryId!}&parentId=${a.id}&field=${field!'categoryId'}"</#if>>
                <#if !(currentCategoryId?has_content) || !(a.id?string=currentCategoryId)>
                <a href="javascript:;" class="exclude-translate" onclick="$.bringBack({parentId:'${a.id}',${field!'categoryId'}:'${a.id}', categoryName:'${a.name}'});return false;">${a.name!}</a>
                <#else>
                ${a.name!}
                </#if>
            </li>
        </#list>
    </@_categoryList>
</ul>
<#else>
<div class="pageFormContent" layoutH>
    <ul class="tree treeFolder expand">
        <li>
            <a href="javascript:;" onclick="$.bringBack({${field!'categoryId'}:'',categoryId:'', categoryName:'',parentId:''});return false;"><@t.page 'button.clear_select'/></a>
        </li>
        <@_categoryList advanced=true parentId=parentId pageSize=500>
        <#list page.list as a>
            <li<#if a.childIds?has_content> _src="cmsCategory/lookup.html?currentCategoryId=${currentCategoryId!}&parentId=${a.id}&field=${field!'categoryId'}"</#if>>
                <#if !(currentCategoryId?has_content) || !(a.id?string=currentCategoryId)>
                <a href="javascript:;" class="exclude-translate" onclick="$.bringBack({parentId:'${a.id}',${field!'categoryId'}:'${a.id}', categoryName:'${a.name}'});return false;">${a.name!}</a>
                <#else>
                ${a.name!}
                </#if>
            </li>
        </#list>
    </@_categoryList>
    </ul>
</div>
<div class="formBar">
    <ul>
        <li><button type="button" class="button close"><@t.page 'button.close'/></button></li>
    </ul>
</div>
</#if>